<?php
  require_once("includes/config.php"); 
//Edit Pop-up"
  if($_SERVER["REQUEST_METHOD"] == "POST")
  {
    $name = $_POST['name'];
    $client_type = $_POST['client_type'];
    $nationality= $_POST['nationality'];
    $identification_type= $_POST['identification_type'];
    $identification_number =$_POST['identification_number'];
    $publication_place = $_POST['publication_place'];
    $expiry_date= $_POST['expiry_date'];
    $mobile = $_POST['mobile'];
    $phone= $_POST['phone'];
    $email=$_POST['email'];
    $workplace= $_POST['workplace'];
    $adress=$_POST['adress'];
    $Notes = $_POST['Notes'];
    $card_copy = $_POST['card_copy'];
	
	 $result = query("INSERT INTO clients (name, client_type, nationality, identification_type,identification_number 
	                 ,publication_place,expiry_date,mobile,phone,email,workplace,adress,Notes ,owner_id,card_copy) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,? ) ", 
      $name,$client_type,$nationality,$identification_type,$identification_number,$publication_place,$expiry_date ,
	  $mobile,$phone,$email,$workplace,$adress,$Notes,$_SESSION['user_id'],$card_copy);
    
    $_SESSION['success_message'] = "تم إضافة العميل بنجاح"; 
    
   redirect("customers.php");

 

 }
	?>